package cn.net.gemai.springboot_properties.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

//@Configuration+@PropertySource+@Value读取.properties
@Configuration
/**
 * 读取非默认properties文件内容
 */
@PropertySource("classpath:test.properties")
public class TestProperties {
    @Value("${test.name}")
    private String name;
    @Value("${test.msg}")
    private String msg;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
